package cn.huiyunche.base.service.enums;

/**
 * 账户冻结状态
 *
 * @author hdy [Tuffy]
 */
public enum FrozenStateEnum {

    UNFROZEN(1, "正常"),
    FROZEN(2, "冻结");

    private final int value;
    private final String text;

    FrozenStateEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static FrozenStateEnum getByValue(int value) {
        for (FrozenStateEnum temp : FrozenStateEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
